package com.zerosky.crm.service;

import java.util.List;
import java.util.Map;

import com.zerosky.crm.po.Employee;
import com.zerosky.crm.util.PageInfo;

/**
 * Employee业务逻辑接口
 * 
 * @author hugy;
 * @since 2017-06-08
 */
public interface EmployeeService {

	/** 验证用户登录信息 */
	public Employee userLogin(Map map);

	/**
	 * Employee列表接口
	 * 
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public List<Employee> getEmployeeListAll(Map<String, Object> map);

	/**
	 * Employee列表接口
	 * 
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public PageInfo<Employee> getEmployeeList(Map<String, Object> map);

	/**
	 * 通过主键查找Employee实体接口
	 * 
	 * @param id
	 *            Employee主键
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public Employee getEmployeeById(String id);

	/**
	 * 保存Employee接口
	 * 
	 * @param Employee
	 *            实体对象, operation 操作类型
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public void saveEmployee(Employee employee, String operation) throws Exception;

	/**
	 * 批量添加Employee接口
	 * 
	 * @param Employee
	 *            实体对象, operation 操作类型
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public int addEmployeeList(List<Employee> list) throws Exception;

	/**
	 * 批量删除Employee接口
	 * 
	 * @param idArray
	 *            Employee主键数组
	 * @author hugy;
	 * @since 2017-06-08
	 */
	public void deleteEmployeeById(String id) throws Exception;

	/**
	 * 总记录数
	 * 
	 * @param map
	 * @return
	 */
	public Integer countEmployee(Map<String, Object> map);

	/**
	 * 统计员工客户数量
	 * 
	 * @param map
	 * @param page
	 * @return
	 */
	public PageInfo<Employee> getEmployeeCustomerNumber(Map<String, Object> map, PageInfo<Employee> page);

	/**
	 * 当前部门每个员工客户数量的总数据条数
	 * 
	 * @param map
	 * @return
	 */
	/*
	 * public Integer getEmployeeCustomerNumberCount(Map<String, Object> map);
	 */
	/**
	 * 新增修改用户账号手机号码时检验数据库中是否已存在
	 * 
	 * @param map
	 * @return
	 * @throws Exception
	 */
	public int checkIsExist(Map<String, Object> map) throws Exception;
}
